﻿using System;
using System.Web;
using System.Web.UI;

namespace Voluntariar.WEB.Include.MasterPage
{
    public partial class MasterPrinc : System.Web.UI.MasterPage
    {
        #region Atributos

        #endregion

        #region Eventos

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                if (Voluntariar.WEB.Util.Sessao.Mensagem != string.Empty)
                {
                    Page page = (Page)HttpContext.Current.Handler;
                    page.ClientScript.RegisterStartupScript(page.GetType(), "javascript", string.Format("MensagemTemporizada('" + Voluntariar.WEB.Util.Sessao.Mensagem + "','3000');"), true);
                    Voluntariar.WEB.Util.Sessao.IniciarMensagem(string.Empty);
                }

            }
        }

        protected void imbContraste_Click(object sender, EventArgs e)
        {
            if (Voluntariar.WEB.Util.Sessao.Contraste != "Contraste")
                Voluntariar.WEB.Util.Sessao.Contraste = "Contraste";
            else
                Voluntariar.WEB.Util.Sessao.Contraste = "Geral";

            Response.Redirect(Request.Url.PathAndQuery, false);
        }

        protected void imbFonte_Click(object sender, ImageClickEventArgs e)
        {
            try
            {

            }
            catch (Exception)
            {

                throw;
            }
        }

        protected void lnbHome_Click(object sender, EventArgs e)
        {
            try
            {
                Response.Redirect("/Home.aspx", false);
            }
            catch (Exception)
            {

                throw;
            }
        }

        protected void lnbLogin_Click(object sender, EventArgs e)
        {
            try
            {
                Response.Redirect("/Login.aspx", false);
            }
            catch (Exception)
            {

                throw;
            }

        }

        protected void lnbEsqueciSenha_Click(object sender, EventArgs e)
        {
            try
            {
                Response.Redirect("/RecuperarSenha.aspx", false);
            }
            catch (Exception)
            {

                throw;
            }

        }

        protected void lnbCadastro_Click(object sender, EventArgs e)
        {
            try
            {
                Response.Redirect("/Cadastro/CadastroUsuario.aspx", false);
            }
            catch (Exception)
            {

                throw;
            }
        }

        #endregion

        #region Métodos
        #endregion

    }
}